package util;

public class StringTool {
	
	private StringTool() {}

	public static String arrayToString(String[] a, String separator) {
		if (a == null || separator == null)	return null;
		
		StringBuilder result = new StringBuilder();
		
		if (a.length > 0) {
			result.append(a[0]);
			for (int i = 1; i < a.length; i++) {
				result.append(separator);
				result.append(a[i]);
			}
		}
		
		return result.toString();
	}
}